package com.hzgj.bcl.soa.config;

import com.google.common.collect.Lists;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import static com.hzgj.bcl.soa.util.Constants.DEFAULT_PROTOCOL;

/**
 * Created by ye.pan on 2015/7/9.
 */
@Getter
@Setter
@ToString
public class ServerDef implements Serializable {

    private String host;
    private int port = -1;
    private String id;
    private String protocol = DEFAULT_PROTOCOL;
    private boolean suspend;
    private String note;
    private Date time;
    private List<ServiceDef.Attr> serviceDefs = Lists.newArrayList();
    private int bossThreads;
    private int workerThreads;
    private String bizPool;

    public ServerDef() {
    }

    public ServerDef(String id) {
        this.id = id;
    }
}
